/*
 * @Author: Bennty
 * @Date: 2024-07-30 15:10:56
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2024-10-30 15:00:25
 * @Description: 请填写简介
 */
import request from '@/utils/request';

/**新增bom */
export const addBomApi = (data:any) =>{
    return request({
        url: '/system/bomInfo',
        method: 'post',
        data: data
    })
};

/** 查询bom列表 */
export const getBOMListApi = (data: any) => {
    return request({
        url: '/system/bomInfo/list',
        method: 'post',
        data: data
    });
};

/** 获取bom详细信息 */
export const getBOMDetailApi = (id: any) => {
    return request({
        url: `/system/bomInfo/${id}`,
        method: 'get',
    })
};

/** 编辑bom */
export const editBomApi = (data:any) =>{
    return request({
        url: '/system/bomInfo',
        method: 'put',
        data: data
    })
};

/** bom放入回收站 */
export const deleteBomApi = (id:any) =>{
    return request({
        url: '/system/bomInfo/recycleBin',
        method: 'delete',
        params:{id: id, delFlag: 1}
    })
};

/** 撤销放入回收站 */
export const revokeDeleteBomApi = (id: any) => {
    return request({
        url: '/system/bomInfo/recycleBin',
        method: 'delete',
        params:{id: id, delFlag: 0}
    })
};

/** 彻底删除bom */
export const totalDeleteBomApi = (ids:any) =>{
    return request({
        url: '/system/bomInfo/${ids}',
        method: 'delete'
    })
};

/** 快速下单接口 */
export const fastOrderBomApi = (data: any)=>{
    return request({
        url: '/system/bomQuickOrder/quickOrder',
        method: 'post',
        data: data
    })
};

/** 销售激活 */
export const saleActiveApi = (data: any) => {
    return request({
        url: '/system/bomInfo/saleActive',
        method: 'put',
        params: data
    })
};

/** 财务激活 */
export const financeActiveApi = (data: any) => {
    return request({
        url: '/system/bomInfo/financeActive',
        method: 'put',
        params: data
    })
};

/** 回收站列表 */
export const getBomRecycleBinApi = (data: any) => {
    return request({
        url: '/system/bomInfo/recycleBinList',
        method: 'post',
        data: data
    })
};